<template>
  <div class="notification">
    <div>来电提示</div>
    <img src="../../public/release.png" alt="" />
    <div>
      <button @click="handleCall('confirm')">接听</button>
      <button @click="handleCall('cancel')">拒绝</button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ipcRenderer } from "electron";

const handleCall = (type: string) => {
  if (type === "confirm") {
    alert("接听");
  } else {
    alert("拒绝");
  }
  ipcRenderer.send("call-response", type);
};
</script>

<style>
.notification {
  text-align: center;
}
</style>
